function indexOtherRefresh() {
  indexOther(function () {});
}
setInterval(indexOtherRefresh, 5000);
function indexOther(fn) {
  function convertKey(arr, key) {
    let newArr = [];
    arr.forEach((item, index) => {
      let newObj = {};
      for (var i = 0; i < key.length; i++) {
        newObj[key[i]] = item[Object.keys(item)[i]];
      }
      newArr.push(newObj);
    });
    console.log(newArr);
    return newArr;
  }
  // 高峰小时高断面客流量
  $.ajax({
    type: "get",
    async: true, //异步执行
    url: base_url + "/lnHrHghSctnPasgrNr",
    dataType: "json", //返回数据形式为json
    success: function (data) {
      if (data.code == 1000) {
        if (data.data !== null) {
          heightSetionflowData = data.data.dataList;
          if (Object.keys(data.data).length !== 0) {
            $(".heightSetionflow_max").text(data.data.max);
            if (heightSetionflowData.length !== 0) {
              heightSetionflowlnHrHghSctnPasgrNr = heightSetionflowData.map(
                (v) => v.lnHrHghSctnPasgrNr
              );
              heightSetionflowlnNm = heightSetionflowData.map((v) => v.lnNm);
              heightSetionflowChart();
            } else {
              $(".linePassengerVChart").html(
                "<div class='noData'>今日暂无数据</div>"
              );
            }
          } else {
            $(".linePassengerVChart").html(
              "<div class='noData'>今日暂无数据</div>"
            );
          }
        } else {
          $(".linePassengerVChart").html(
            "<div class='noData'>今日暂无数据</div>"
          );
        }
      } else {
        alert(data.message);
      }
      fn();
    },
    error: function (errorMsg) {
      console.log("请求数据失败");
    },
  });
  // 线路清客次数;
  $.ajax({
    type: "get",
    async: true, //异步执行
    url: base_url + "/lnClerCustNr",
    dataType: "json", //返回数据形式为json
    success: function (data) {
      if (data.code == 1000) {
        if (data.data !== null) {
          passengerClearanceTimesData = data.data.dataList;
          if (Object.keys(data.data).length !== 0) {
            $(".passengerClearanceTimes_total").text(data.data.total);
            if (passengerClearanceTimesData.length !== 0) {
              passengerClearanceTimesData = convertKey(
                passengerClearanceTimesData,
                ["name", "value"]
              );
              passengerClearanceTimeslnNm = passengerClearanceTimesData.map(
                (v) => v.name
              );
              passengerClearanceTimesChart();
            } else {
              $(".passengerClearanceTimesChart").html(
                "<div class='noData'>今日暂无数据</div>"
              );
            }
          } else {
            $(".passengerClearanceTimesChart").html(
              "<div class='noData'>今日暂无数据</div>"
            );
          }
        } else {
          $(".passengerClearanceTimesChart").html(
            "<div class='noData'>今日暂无数据</div>"
          );
        }
      } else {
        alert(data.message);
      }
      fn();
    },
    error: function (errorMsg) {
      console.log("请求数据失败");
    },
  });
  // 线路延误事件数
  $.ajax({
    type: "get",
    async: true, //异步执行
    url: base_url + "/lnDlyNr",
    dataType: "json", //返回数据形式为json
    success: function (data) {
      if (data.code == 1000) {
        if (data.data !== null) {
          lineDelayData = data.data.dataList;
          if (Object.keys(data.data).length !== 0) {
            $(".lineDelay_total").text(data.data.total);
            if (lineDelayData.length !== 0) {
              lineDelayChart();
            } else {
              $(".lineDelayChart").html(
                "<div class='noData'>今日暂无数据</div>"
              );
            }
          } else {
            $(".lineDelayChart").html("<div class='noData'>今日暂无数据</div>");
          }
        } else {
          $(".lineDelayChart").html("<div class='noData'>今日暂无数据</div>");
        }
      } else {
        alert(data.message);
      }
      fn();
    },
    error: function (errorMsg) {
      console.log("请求数据失败");
    },
  });
  // 运营规模;
  $.ajax({
    type: "get",
    async: true, //异步执行
    url: base_url + "/optgDyNrAndOptgLnNrAndTrnsfrStatnTotl",
    dataType: "json", //返回数据形式为json
    success: function (data) {
      if (data.code == 1000) {
        if (data.data !== null) {
          operationScaleData = data.data.dataList;
          if (Object.keys(data.data).length !== 0) {
            $(".operationScale_average").text(data.data.num);
            if (operationScaleData.length !== 0) {
              operationScaleChart();
            } else {
              $(".operationScaleChart").html(
                "<div class='noData'>今日暂无数据</div>"
              );
            }
          } else {
            $(".operationScaleChart").html(
              "<div class='noData'>今日暂无数据</div>"
            );
          }
        } else {
          $(".operationScaleChart").html(
            "<div class='noData'>今日暂无数据</div>"
          );
        }
      } else {
        alert(data.message);
      }
      fn();
    },
    error: function (errorMsg) {
      console.log("请求数据失败");
    },
  });
}
indexOtherRefresh(function () {});
//高峰小时高断面客流量
// heightSetionflowChart();
function heightSetionflowChart() {
  let heightSetionflowC = document.getElementsByClassName(
    "heightSetionflow_chart"
  );
  for (var i = 0; i < heightSetionflowC.length; i++) {
    let myChart = echarts.init(heightSetionflowC[i]);
    option = {
      legend: {
        orient: "vertical",
        top: "center",
        right: "3%",
        itemWidth: 12,
        itemHeight: 8,
        itemGap: 3,
        data: heightSetionflowlnNm,
        textStyle: {
          color: "#fff",
          fontSize: 12,
        },
      },
      tooltip: {
        trigger: "item",
        formatter: "{a} <br/>{b} : {c} ({d}%)",
      },
      series: [
        {
          name: "半径模式",
          type: "pie",
          radius: ["50%", "80%"],
          center: ["40%", "55%"],
          roseType: "radius",
          label: {
            show: true,
            normal: {
              position: "outside",
              fontSize: 12,
            },
          },
          labelLine: {
            length: 1,
            length2: 10,
            smooth: true,
          },
          data: [
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[0],
              name: heightSetionflowlnNm[0],
              itemStyle: {
                color: "rgba(50,123,250,0.7)",
                borderColor: "rgba(50,123,250,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[1],
              name: heightSetionflowlnNm[1],
              itemStyle: {
                color: "rgba(244,201,7,0.7)",
                borderColor: "rgba(244,201,7,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[2],
              name: heightSetionflowlnNm[2],
              itemStyle: {
                color: "rgba(23,216,161,0.7)",
                borderColor: "rgba(23,216,161,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[3],
              name: heightSetionflowlnNm[3],
              itemStyle: {
                color: "rgba(122,60,235,0.7)",
                borderColor: "rgba(122,60,235,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[4],
              name: heightSetionflowlnNm[4],
              itemStyle: {
                color: "rgba(15,197,243,0.7)",
                borderColor: "rgba(15,197,243,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[5],
              name: heightSetionflowlnNm[5],
              itemStyle: {
                color: "rgba(50,123,250,0.7)",
                borderColor: "rgba(50,123,250,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[6],
              name: heightSetionflowlnNm[6],
              itemStyle: {
                color: "rgba(244,201,7,0.7)",
                borderColor: "rgba(244,201,7,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[7],
              name: heightSetionflowlnNm[7],
              itemStyle: {
                color: "rgba(23,216,161,0.7)",
                borderColor: "rgba(23,216,161,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[8],
              name: heightSetionflowlnNm[8],
              itemStyle: {
                color: "rgba(122,60,235,0.7)",
                borderColor: "rgba(122,60,235,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[9],
              name: heightSetionflowlnNm[9],
              itemStyle: {
                color: "rgba(50,123,250,0.7)",
                borderColor: "rgba(50,123,250,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[10],
              name: heightSetionflowlnNm[10],
              itemStyle: {
                color: "rgba(244,201,7,0.7)",
                borderColor: "rgba(244,201,7,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[11],
              name: heightSetionflowlnNm[11],
              itemStyle: {
                color: "rgba(23,216,161,0.7)",
                borderColor: "rgba(23,216,161,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[12],
              name: heightSetionflowlnNm[12],
              itemStyle: {
                color: "rgba(122,60,235,0.7)",
                borderColor: "rgba(122,60,235,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[13],
              name: heightSetionflowlnNm[13],
              itemStyle: {
                color: "rgba(15,197,243,0.7)",
                borderColor: "rgba(15,197,243,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[14],
              name: heightSetionflowlnNm[14],
              itemStyle: {
                color: "rgba(50,123,250,0.7)",
                borderColor: "rgba(50,123,250,1)",
                borderWidth: 3,
              },
            },
            {
              value: heightSetionflowlnHrHghSctnPasgrNr[15],
              name: heightSetionflowlnNm[15],
              itemStyle: {
                color: "rgba(244,201,7,0.7)",
                borderColor: "rgba(244,201,7,1)",
                borderWidth: 3,
              },
            },
          ],
        },
      ],
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
  }
}
//线路清客次数
// passengerClearanceTimesChart();
function passengerClearanceTimesChart() {
  let heightSetionflowC = document.getElementsByClassName(
    "passengerClearanceTimesChart"
  );
  for (var i = 0; i < heightSetionflowC.length; i++) {
    let myChart = echarts.init(heightSetionflowC[i]);
    option = {
      backgroundColor: "#0B1837",
      color: ["#EAEA26", "#906BF9", "#FE5656", "#01E17E", "#3DD1F9", "#FFAD05"],
      tooltip: {
        trigger: "item",
        formatter: "{b} : {c} ({d}%)",
      },
      legend: {
        type: "scroll",
        orient: "vartical",
        // x: "right",
        top: "center",
        right: "0%",
        // bottom: "0%",
        itemWidth: 16,
        itemHeight: 8,
        itemGap: 10,
        textStyle: {
          color: "#A3E2F4",
          fontSize: 12,
          fontWeight: 0,
        },
        data: passengerClearanceTimeslnNm,
      },
      polar: { radius: "40%", center: ["40%", "50%"] },
      angleAxis: {
        interval: 1,
        type: "category",
        data: [],
        z: 10,
        axisLine: {
          show: false,
          lineStyle: {
            color: "#0B4A6B",
            width: 1,
            type: "solid",
          },
        },
        axisLabel: {
          interval: 0,
          show: true,
          color: "#0B4A6B",
          margin: 8,
          fontSize: 30,
        },
      },
      radiusAxis: {
        min: 40,
        max: 120,
        interval: 20,
        axisLine: {
          show: false,
          lineStyle: {
            color: "#0B3E5E",
            width: 1,
            type: "solid",
          },
        },
        axisLabel: {
          formatter: "{value} %",
          show: false,
          padding: [0, 0, 20, 0],
          color: "#0B3E5E",
          fontSize: 30,
        },
        splitLine: {
          lineStyle: {
            color: "#0B3E5E",
            width: 2,
            type: "solid",
          },
        },
      },
      calculable: true,
      series: [
        {
          type: "pie",
          center: ["40%", "50%"],
          radius: ["5%", "10%"],
          hoverAnimation: false,
          labelLine: {
            normal: {
              show: false,
              length: 8,
              length2: 10,
            },
            emphasis: {
              show: false,
            },
          },
          data: [
            {
              name: "",
              value: 0,
              itemStyle: {
                normal: {
                  color: "#0B4A6B",
                },
              },
            },
          ],
        },
        {
          type: "pie",
          radius: ["70%", "75%"],
          center: ["40%", "50%"],
          hoverAnimation: false,
          labelLine: {
            normal: {
              show: false,
              length: 8,
              length2: 10,
            },
            emphasis: {
              show: false,
            },
          },
          name: "",
          data: [
            {
              name: "",
              value: 0,
              itemStyle: {
                normal: {
                  color: "#0B4A6B",
                },
              },
            },
          ],
        },
        {
          stack: "a",
          type: "pie",
          radius: ["40%", "70%"],
          center: ["40%", "50%"],
          roseType: "area",
          zlevel: 10,
          label: {
            normal: {
              show: true,
              formatter: "{c}",
              textStyle: {
                fontSize: 12,
              },
              position: "outside",
            },
            emphasis: {
              show: true,
            },
          },
          labelLine: {
            normal: {
              show: true,
              length: 8,
              length2: 10,
            },
            emphasis: {
              show: false,
            },
          },
          data: passengerClearanceTimesData,
        },
      ],
    };
    myChart.setOption(option);
  }
}
//线路延误事件数
function lineDelayChart() {
  let linePassengerVC = document.getElementsByClassName("lineDelayChart");
  for (var i = 0; i < linePassengerVC.length; i++) {
    let myChart = echarts.init(linePassengerVC[i]);
    var myRate1 = 50;
    option = {
      backgroundColor: "#031845",
      title: [
        {
          x: "10%",
          bottom: "10%",
          text: "5min~15min",
          textStyle: {
            fontWeight: "normal",
            fontSize: 12,
            color: "#fff",
          },
        },
        {
          x: "39%",
          bottom: "10%",
          text: "15min~30min",
          textStyle: {
            fontWeight: "normal",
            fontSize: 12,
            color: "#fff",
          },
        },
        {
          x: "76%",
          bottom: "10%",
          text: "30min以上",
          textStyle: {
            fontWeight: "normal",
            fontSize: 12,
            color: "#fff",
          },
        },
      ],
      tooltip: {
        show: true,
      },
      series: [
        {
          type: "gauge",
          center: ["50%", "55%"], // 默认全局居中
          radius: "45%",
          splitNumber: 6, //刻度数量
          min: 0,
          max: 30,
          startAngle: 200,
          endAngle: -20,
          clockwise: true,
          axisLine: {
            show: true,
            lineStyle: {
              width: 2,
              shadowBlur: 0,
              color: [[1, "#03B7C9"]],
            },
          },
          axisTick: {
            show: true,
            lineStyle: {
              color: "#03B7C9",
              width: 1,
            },
            length: -10,
            splitNumber: 6,
          },
          splitLine: {
            show: true,
            length: -15,
            lineStyle: {
              color: "#03B7C9",
            },
          },
          axisLabel: {
            distance: -15,
            textStyle: {
              color: "#03B7C9",
              fontSize: "10",
              fontWeight: "bold",
            },
          },
          pointer: {
            //仪表盘指针
            show: 0,
          },
          detail: {
            show: false,
          },
          data: [
            {
              name: "",
              value: myRate1,
            },
          ],
        },
        {
          startAngle: 200,
          endAngle: -20,
          type: "gauge",
          center: ["50%", "55%"], // 默认全局居中
          radius: "40%",
          min: 0,
          max: 30,
          splitNumber: 0,
          axisLine: {
            // 坐标轴线
            lineStyle: {
              color: [
                [0.66, "#dddddd"],
                [1, "#dddddd"],
              ], // 属性lineStyle控制线条样式
              width: 4,
            },
          },

          axisLabel: {
            // 坐标轴小标记
            textStyle: {
              // 属性lineStyle控制线条样式
              fontWeight: "bolder",
              fontSize: 12,
              color: "rgba(30,144,255,0)",
            },
          },
          splitLine: {
            // 分隔线
            length: 10, // 属性length控制线长
            lineStyle: {
              // 属性lineStyle（详见lineStyle）控制线条样式
              width: 0,
              color: "#444",
            },
          },
          pointer: {
            // 分隔线 指针
            color: "#666666",
            width: 0,
            length: 230,
          },
          detail: {
            show: false,
          },
        },
        {
          name: "15min(含)30min",
          type: "gauge",
          startAngle: 200,
          endAngle: -20,
          radius: "40%",
          center: ["50%", "55%"], // 默认全局居中
          min: 0,
          max: 30,
          axisLine: {
            show: false,
            lineStyle: {
              width: 25,
              shadowBlur: 0,
              color: [
                [0.2, "#00FAFC"],
                [0.4, "#3BD542"],
                [0.6, "#E3F424"],
                [0.8, "#7E48DA"],
                [1, "#E531A8"],
              ],
            },
          },
          axisTick: {
            show: false,
          },
          splitLine: {
            show: false,
            length: 15,
          },

          axisLabel: {
            show: false,
          },
          pointer: {
            show: true,
            width: 5,
          },
          detail: {
            show: true,
            offsetCenter: [0, "50%"],
            textStyle: {
              fontSize: 20,
            },
          },
          itemStyle: {
            normal: {
              color: "#03B7C9",
            },
          },
          data: [
            {
              value: lineDelayData.lnDlyNr2,
            },
          ],
        },
        {
          type: "gauge",
          center: ["22%", "55%"], // 默认全局居中
          radius: "45%",
          splitNumber: 6, //刻度数量
          min: 0,
          max: 30,
          endAngle: 45,
          clockwise: true,
          axisLine: {
            show: true,
            lineStyle: {
              width: 2,
              shadowBlur: 0,
              color: [[1, "#03B7C9"]],
            },
          },
          axisTick: {
            show: true,
            lineStyle: {
              color: "#03B7C9",
              width: 1,
            },
            length: -10,
            splitNumber: 6,
          },
          splitLine: {
            show: true,
            length: -15,
            lineStyle: {
              color: "#03B7C9",
            },
          },
          axisLabel: {
            distance: -20,
            textStyle: {
              color: "#03B7C9",
              fontSize: "10",
              fontWeight: "bold",
            },
          },
          pointer: {
            //仪表盘指针
            show: 0,
          },
          detail: {
            show: false,
          },
          data: [
            {
              name: "",
              value: myRate1,
            },
          ],
        },
        {
          type: "gauge",
          center: ["22%", "55%"], // 默认全局居中
          radius: "40%",
          min: 0,
          max: 30,
          endAngle: 45,
          splitNumber: 0,
          axisLine: {
            // 坐标轴线
            lineStyle: {
              color: [
                [0.66, "#dddddd"],
                [1, "#dddddd"],
              ], // 属性lineStyle控制线条样式
              width: 4,
            },
          },

          axisLabel: {
            // 坐标轴小标记
            textStyle: {
              // 属性lineStyle控制线条样式
              fontWeight: "bolder",
              fontSize: 20,
              color: "rgba(30,144,255,0)",
            },
          },
          splitLine: {
            // 分隔线
            length: 10, // 属性length控制线长
            lineStyle: {
              // 属性lineStyle（详见lineStyle）控制线条样式
              width: 0,
              color: "#444",
            },
          },
          pointer: {
            // 分隔线 指针
            color: "#666666",
            width: 0,
            length: 230,
          },
          detail: {
            show: false,
          },
        },
        {
          name: "5min(含)15min",
          type: "gauge",
          endAngle: 45,
          radius: "40%",
          center: ["22%", "55%"], // 默认全局居中
          min: 0,
          max: 30,

          axisLine: {
            show: false,
            lineStyle: {
              width: 25,
              shadowBlur: 0,
              color: [
                [0.2, "#00FAFC"],
                [0.4, "#3BD542"],
                [0.6, "#E3F424"],
                [0.8, "#7E48DA"],
                [1, "#E531A8"],
              ],
            },
          },
          axisTick: {
            show: false,
          },
          splitLine: {
            show: false,
            length: 20,
          },

          axisLabel: {
            show: false,
          },
          pointer: {
            show: true,
            width: 5,
          },
          detail: {
            show: true,
            offsetCenter: [0, "75%"],
            textStyle: {
              fontSize: 20,
            },
          },
          itemStyle: {
            normal: {
              color: "#03B7C9",
            },
          },
          data: [
            {
              value: lineDelayData.lnDlyNr1,
            },
          ],
        },
        {
          type: "gauge",
          center: ["80%", "55%"], // 默认全局居中
          radius: "45%",
          splitNumber: 6, //刻度数量
          min: 0,
          max: 30,
          startAngle: 140,
          endAngle: -45,
          clockwise: true,
          axisLine: {
            show: true,
            lineStyle: {
              width: 2,
              shadowBlur: 0,
              color: [[1, "#03B7C9"]],
            },
          },
          axisTick: {
            show: true,
            lineStyle: {
              color: "#03B7C9",
              width: 1,
            },
            length: -10,
            splitNumber: 5,
          },
          splitLine: {
            show: true,
            length: -15,
            lineStyle: {
              color: "#03B7C9",
            },
          },
          axisLabel: {
            distance: -15,
            textStyle: {
              color: "#03B7C9",
              fontSize: "10",
              fontWeight: "bold",
            },
          },
          pointer: {
            //仪表盘指针
            show: 0,
          },
          detail: {
            show: false,
          },
          data: [
            {
              name: "",
              value: myRate1,
            },
          ],
        },
        {
          type: "gauge",
          center: ["80%", "55%"], // 默认全局居中
          radius: "40%",
          min: 0,
          max: 30,
          startAngle: 140,
          endAngle: -45,
          splitNumber: 0,
          axisLine: {
            // 坐标轴线
            lineStyle: {
              color: [
                [0.66, "#dddddd"],
                [1, "#dddddd"],
              ], // 属性lineStyle控制线条样式
              width: 4,
            },
          },

          axisLabel: {
            // 坐标轴小标记
            textStyle: {
              // 属性lineStyle控制线条样式
              fontWeight: "bolder",
              fontSize: 10,
              color: "rgba(30,144,255,0)",
            },
          },
          splitLine: {
            // 分隔线
            length: 10, // 属性length控制线长
            lineStyle: {
              // 属性lineStyle（详见lineStyle）控制线条样式
              width: 0,
              color: "#444",
            },
          },
          pointer: {
            // 分隔线 指针
            color: "#666666",
            width: 0,
            length: 230,
          },
          detail: {
            show: false,
          },
        },
        {
          name: "30min以上",
          type: "gauge",
          startAngle: 140,
          endAngle: -45,
          radius: "40%",
          center: ["80%", "55%"], // 默认全局居中
          min: 0,
          max: 30,
          axisLine: {
            show: false,
            lineStyle: {
              width: 25,
              shadowBlur: 0,
              color: [
                [0.2, "#00FAFC"],
                [0.4, "#3BD542"],
                [0.6, "#E3F424"],
                [0.8, "#7E48DA"],
                [1, "#E531A8"],
              ],
            },
          },
          axisTick: {
            show: false,
          },
          splitLine: {
            show: false,
            length: 5,
          },

          axisLabel: {
            show: false,
          },
          pointer: {
            show: true,
            width: 5,
          },
          detail: {
            show: true,
            offsetCenter: [0, "75%"],
            textStyle: {
              fontSize: 16,
            },
          },
          itemStyle: {
            normal: {
              color: "#03B7C9",
            },
          },
          data: [
            {
              value: lineDelayData.lnDlyNr3,
            },
          ],
        },
      ],
    };
    myChart.setOption(option);
  }
}
//运营规模
function operationScaleChart() {
  let peakMaxCongestC = document.getElementsByClassName("operationScaleChart");
  let optgLnNr = [];
  let trnsfrStatnTotl = [];
  let optgDyNr = [];
  let optgDyNrIndicator = [];
  let indicator = [];
  operationScaleData.forEach((item, index) => {
    optgLnNr.push(item.optgLnNr);
    trnsfrStatnTotl.push(item.trnsfrStatnTotl);
    optgDyNr.push(item.optgDyNr);
    optgDyNrIndicator.push({
      // name: item.sctn+"年\n"+item.optgDyNr,
      name: item.sctn + "年",
      max: 370,
    });
    indicator.push({
      name: item.sctn + "年",
      max: 70,
    });
  });
  for (var i = 0; i < peakMaxCongestC.length; i++) {
    let myChart = echarts.init(peakMaxCongestC[i]);
    option = {
      tooltip: {
        trigger: "axis",
        backgroundColor: "rgba(13, 178, 255, .4)",
        borderColor: "rgba(13, 178, 255, 1)",
        borderWidth: 2,
        textStyle: {
          align: "left",
        },
      },
      title: [
        {
          x: "28%",
          top: "65%",
          text: "运营天数",
          textStyle: {
            fontWeight: "normal",
            fontSize: 12,
            color: "#fff",
          },
        },
        {
          x: "65%",
          bottom: "5%",
          text: "运营线路条数\n换成车站总数",
          textStyle: {
            fontWeight: "normal",
            fontSize: 12,
            color: "#fff",
          },
        },
      ],
      radar: [
        {
          indicator: optgDyNrIndicator,
          radius: "30%",
          center: ["35%", "35%"],
          shape: "circle",
          splitNumber: 4,
          name: {
            textStyle: {
              color: "#ffffff",
              fontSize: 10,
            },
          },
          splitArea: {
            areaStyle: {
              color: [
                "rgba(255,255,255,0.1)",
                "rgba(255,255,255,0.03)",
                "rgba(255,255,255,0.1)",
                "rgba(255,255,255,0.03)",
              ],
            },
          },
          splitLine: {
            lineStyle: {
              color: [
                "#6b6b6b",
                "#6b6b6b",
                "#6b6b6b",
                "#6b6b6b",
                "#6b6b6b",
                "#6b6b6b",
              ].reverse(),
              width: 1,
            },
          },
          axisLine: {
            lineStyle: {
              color: "rgba(238,238,238, 0.2)",
            },
          },
        },
        {
          center: ["74%", "50%"],
          radius: "35%",
          startAngle: 90,
          splitNumber: 6,
          shape: "circle",
          name: {
            textStyle: {
              color: "#78C5EC",
              fontSize: "10",
              borderRadius: 3,
              // padding: [3, 5],
            },
          },
          splitArea: {
            areaStyle: {
              color: ["#030C57"],
            },
          },
          axisLabel: {
            show: false,
            fontSize: 12,
            color: "#78C5EC",
            fontStyle: "normal",
            fontWeight: "normal",
          },
          axisLine: {
            show: true,
            lineStyle: {
              color: "#6885D1", //
            },
          },
          splitLine: {
            show: true,
            lineStyle: {
              color: "#6885D1", //
            },
          },
          indicator: indicator,
        },
      ],
      series: [
        {
          name: "运营规模",
          type: "radar",
          tooltip: {
            trigger: "item",
          },
          data: [
            {
              value: optgDyNr,
            },
          ],
          symbol: "circle",
          symbolSize: 8,
          itemStyle: {
            normal: {
              color: "rgba(87,201,255,0.8)",
              borderColor: "rgba(87,201,255,0.2)",
              borderWidth: 8,
            },
          },
          areaStyle: {
            normal: {
              color: "rgba(13, 178, 255, 0.49)",
            },
          },
          lineStyle: {
            normal: {
              color: "rgba(13, 178, 255, 1)",
              width: 1,
            },
          },
        },
        {
          name: "运营线路条数",
          type: "radar",
          symbol: "circle",
          symbolSize: 10,
          radarIndex: 1,
          itemStyle: {
            normal: {
              color: "rgba(255,255,0, 1)",
            },
          },
          areaStyle: {
            normal: {
              color: "rgba(255,255,0, 0.5)",
            },
          },
          lineStyle: {
            normal: {
              color: "rgba(255,255,0, 1)",
              width: 2,
            },
          },
          data: [optgLnNr],
        },
        {
          name: "换乘车站总数",
          type: "radar",
          symbol: "circle",
          symbolSize: 10,
          radarIndex: 1,
          itemStyle: {
            normal: {
              color: "rgba(0,192,255, 1)",
            },
          },
          areaStyle: {
            normal: {
              color: "rgba(0,192,255, 0.5)",
            },
          },
          lineStyle: {
            normal: {
              color: "rgba(0,192,255, 1)",
              width: 2,
            },
          },
          data: [trnsfrStatnTotl],
        },
      ],
    };

    myChart.setOption(option);
  }
}
